package yf.mall.vo.down;


import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.*;
import java.io.Serializable;


import java.math.BigDecimal;

import yf.mall.entity.LotteryActEntity;
import yf.mall.vo.LotteryActVo;

            import yf.mall.enums.LotteryActStatusEnum;
                        
/**
 * 抽奖活动实体
 * 表名 lottery_act
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Thu Aug 20 10:29:43 CST 2020
 */
@Data
public class LotteryActDown implements Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

                        //
            @ExcelProperty("")
            private Long id;
        
                        //活动名称
            @ExcelProperty("活动名称")
            private String name;
        
                        //ENUM-状态:"CLOSE-关闭","OPEN-开始"
            @ExcelIgnore
            private Integer status;
                        @ExcelProperty("状态")
            private String statusStr;
        
                        //开始时间
            @ExcelProperty("开始时间")
            private Date startTime;
        
                        //结束时间
            @ExcelProperty("结束时间")
            private Date endTime;
        
                        //消耗数量
            @ExcelProperty("消耗数量")
            private BigDecimal amount;
        
                        //IMG-奖品图
            @ExcelProperty("IMG-奖品图")
            private String actImg;
        
                        //IMG-背景图
            @ExcelProperty("IMG-背景图")
            private String bgImg;
        
                        //抽奖总数
            @ExcelProperty("抽奖总数")
            private Integer number;
        
    
    public LotteryActDown() {

    }

    public LotteryActDown(LotteryActVo vo) {
        LotteryActEntity entity = vo.getEntity();
                                    this.setId(entity.getId());
            
                                    this.setName(entity.getName());
            
                                    this.setStatus(entity.getStatus());
                if(entity.getStatus()!=null){
                    this.setStatusStr( LotteryActStatusEnum.indexOf(entity.getStatus()));
                }
            
                                    this.setStartTime(entity.getStartTime());
            
                                    this.setEndTime(entity.getEndTime());
            
                                    this.setAmount(entity.getAmount());
            
                                    this.setActImg(entity.getActImg());
            
                                    this.setBgImg(entity.getBgImg());
            
                                    this.setNumber(entity.getNumber());
            
            }


}
